<?
$username = $_GET['username'];


include("../db/opendb.php");
include("functions.php");

$query = "select ID from Users where Username='".$username."'";
$result = mysql_query($query) or die ("SQL Error".mysql_error());
$row=mysql_fetch_assoc($result);

$user_id = $row['ID'];


//$query = "select l.OID, l.LISTSTATUS, l.STREETDIR, l.STREETNUM, l.STREETNAME, l.STREETSUFFIX, l.CITY, l.STATE from PROPERTIES l inner join Prop_Owner_Con p on p.Prop_OID = l.OID inner join Users u on u.ID = p.Owner where u.Username = '".$username."' order by l.LISTSTATUS";

$query = "Select r.Message, r.Date_Created as datecreated, u.First_Name, u.Last_Name, u.username, u.ID, u.Image from Recommendations r inner join Users u on u.ID = r.Owner where r.Other_User = '".$user_id."' and r.Status=1";

$result = mysql_query($query) or die ("SQL Error".mysql_error());

$xml = getXML($result);

echo $xml;
?>